<%-- 
    Document   : popuptemplate
    Created on : Jun 4, 2012, 2:47:19 PM
    Author     : ems
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="../css/popup.css"/>  
        <link rel="stylesheet" type="text/css" href="../css/kapiform.css"/>
    </head>
    <script type="text/javascript">
        var open_cur = 0;
        if (typeof jQuery == 'undefined') {
            window.location.href="accessdenied.jsp";
        }
        $j = jQuery.noConflict();
        $j(document).ready(function(){
              
          
            validateform("form-input-customer");
        });

    </script>
    <style type="text/css">
        .bg_department{
            height: 68 !important;
        }
        
    </style>
    <f:view>
        <a4j:form id="form-input-customer" >
            <body style=" float:left; width:auto; height:auto; margin:0px;">
                <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>


                <div class="popup" style="height:450px; width:370px">
                    <div class="popup-header">
                        <div class="title"><h:outputText value="#{locale.customer_company_add}"/></div>
                    </div>
                    <div class="popup-content">
                        <div class="main_content" style=" margin-top: -20px;">
                            <div class="form_item_content">
                                <div class="item_content" style="display:block">

                                    <div class="fields_input">
                                        <label style="text-align:left; margin-left:21px"><h:outputText value="#{locale.companyname}"/><span>*</span></label>
                                        <h:inputText value="#{k100Controller.KV103}" styleClass="required" id="cusname" style="width:300px;margin-left:25px;" />
                                        
                                    </div>
                                    <div class="fields_input">
                                        <label><h:outputText value="Tên giao dịch"/>: </label>
                                         <h:inputText value="#{k100Controller.KV106}" id="cusname1" style="width:202px;" />
                                    </div>
                                    <div class="fields_input">
                                        <label><h:outputText value="#{locale.career}"/>: </label>
                                        <h:selectOneMenu id="comboboxn550" value="#{k100Controller.FN550}"  styleClass="combobox" style="width:202px;">
                                            <f:selectItems value="#{k100Controller.combN550}"></f:selectItems>
                                        </h:selectOneMenu>
                                        <h:inputHidden id="pnPK100" value="#{k100Controller.PK100}" />
                                        <h:inputHidden id="pnKV102" value="#{k100Controller.KV102}" />
                                        <h:inputHidden id="pnKV110" value="#{k100Controller.KV110}" />
                                    </div>
                                    <div class="fields_input">
                                        <label><h:outputText value="#{locale.customertype}"/>:</label>
                                        <h:selectOneRadio value="#{k100Controller.KN114}" id="sex" styleClass="select_cus"  style="margin-left:15px;"  >
                                            <f:selectItem itemValue="1" itemLabel="#{locale.normalcustomer}"/>
                                            <f:selectItem itemValue="0" itemLabel="#{locale.hiddencustomer}"/>
                                        </h:selectOneRadio>
                                    </div>

                                    <div class="bg_department">

                                        <div class="fields_input">
                                            <label ><h:outputText value="#{locale.department}"/>:</label>&nbsp;
                                            <h:selectOneMenu  styleClass="combobox"  id="cmbNv113" lang="#{k100Controller.FN850}" value="#{k100Controller.FN850}" style="width:202px;" >
                                                <f:selectItems value="#{k100Controller.combN850}" />
                                                <a4j:support event="onchange" actionListener="#{k100Controller.changeCombN850forN900}"
                                                             reRender="nv113" />
                                            </h:selectOneMenu>
                                        </div>
                                        <div class="fields_input">
                                            <label ><h:outputText value="#{locale.employee}(GT)"/>:</label>&nbsp;
                                            <h:selectOneMenu id="nv113" value="#{k100Controller.KV104}"  styleClass="combobox" style="width:202px;">
                                                <f:selectItems value="#{k100Controller.combN900}"></f:selectItems>
                                            </h:selectOneMenu>
                                        </div>

                                    </div>
                                    <div class="fields_input">
                                        <label style="text-align:left; margin-left:21px"><h:outputText value="#{locale.description}"/> </label>
                                        <h:inputTextarea value="#{k100Controller.KV101}" style="height:70px; width:300px; margin-left:25px" ></h:inputTextarea>

                                        </div>

                                        <div class="alert"></div>
                                    </div>

                                </div>
                            </div>

                        </div>

                        <div class="popup-footer">

                            <div class="buttonsave" style="margin-right: 35px;" onclick="parent.jQuery.fancybox.close(); "  ><span><h:outputText value="#{locale.button_close}"/></span></div>
                        <h:commandButton   onclick="return validatecheck('form-input-customer');"  action="#{k100Controller.saveK100}" value="#{locale.button_save}" styleClass="buttonsave">

                        </h:commandButton>


                    </div>

                </div>          
            </body>
        </a4j:form>
    </f:view>
</html>
<script type="text/javascript">
    $j(document).ready(function(){
        yhight = ($j('.popup').height()-90)+"px" ;
        $j('.main_content').css('height',yhight );
        $j('.popup-content').css('height',yhight );
    });
</script>